<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Specifies Element-Set Name for retrieval</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.yaz-database.html">« yaz_database</a></li>
      <li style="float: right;"><a href="function.yaz-errno.html">yaz_errno »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.yaz.html">YAZ 函数</a></li>
    <li>Specifies Element-Set Name for retrieval</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.yaz-element" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">yaz_element</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.1, PECL yaz &gt;= 0.9.0)</p><p class="refpurpose"><span class="refname">yaz_element</span> &mdash; <span class="dc-title">
   Specifies Element-Set Name for retrieval
  </span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.yaz-element-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>yaz_element</strong></span>(<span class="methodparam"><span class="type">resource</span> <code class="parameter">$id</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$elementset</code></span>): <span class="type">bool</span></div>

  <p class="para rdfs-comment">
   This function sets the element set name for retrieval.
  </p>
  <p class="para">
   Call this function before <span class="function"><a href="function.yaz-search.html" class="function">yaz_search()</a></span> or
   <span class="function"><a href="function.yaz-present.html" class="function">yaz_present()</a></span> to specify the element set name for
   records to be retrieved.
  </p>
  <blockquote class="note"><p><strong class="note">注意</strong>: 
   <p class="para">
    If this function appears to have no effect, see the description of the 
    <code class="literal">piggybacking</code> option in 
    <span class="function"><a href="function.yaz-connect.html" class="function">yaz_connect()</a></span>.
   </p>
  </p></blockquote>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.yaz-element-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">id</code></dt>

     <dd>

      <p class="para">
       The connection resource returned by <span class="function"><a href="function.yaz-connect.html" class="function">yaz_connect()</a></span>.
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">elementset</code></dt>

     <dd>

      <p class="para">
       Most servers support <code class="literal">F</code> (for full records) and
       <code class="literal">B</code> (for brief records).
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.yaz-element-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>true</code></strong>， 或者在失败时返回 <strong><code>false</code></strong>。
  </p>
 </div>

</div></div></div></body></html>